package cs4280.ass2.util;

import org.apache.commons.lang.StringUtils;

import cs4280.ass2.entity.House;
import cs4280.ass2.exception.ValidateException;

public class HouseUtils {
	
	public static void validate(House house) throws ValidateException {
		if (StringUtils.isBlank(house.getName())) {
			throw new ValidateException("message.error.validate.house.name.empty");
		}
		if (StringUtils.isBlank(house.getAddress())) {
			throw new ValidateException("message.error.validate.house.address.empty");
		}
	}
}
